/*
 * Copyright (c) OSGi Alliance (2005). All Rights Reserved.
 *
 * This program and the accompanying materials are made available under the
 * terms of the Eclipse Public License v1.0 which accompanies this
 * distribution, and is available at http://www.eclipse.org/legal/epl-v10.html.
 *
 * This copyright applies to the comments and public final static String fields only
 */
package org.osgi.core.framework
{

	/**
	 * Class for storing constants used in bundles.
	 * Moved the constants from interface Bundle, since its not allowed to define consts in interfaces.
	 * @author Geirr Winnem
	 *
	 */
	public class BundleConstants
	{
		/**
		 * This bundle is uninstalled and may not be used.
		 *
		 * <p>
		 * The <code>UNINSTALLED</code> state is only visible after a bundle is
		 * uninstalled; the bundle is in an unusable state but references to the
		 * <code>Bundle</code> object may still be available and used for
		 * introspection.
		 * <p>
		 * The value of <code>UNINSTALLED</code> is 0x00000001.
		 */
		public static var UNINSTALLED:int=0x00000001;

		/**
		 * This bundle is installed but not yet resolved.
		 *
		 * <p>
		 * A bundle is in the <code>INSTALLED</code> state when it has been
		 * installed in the Framework but cannot run.
		 * <p>
		 * This state is visible if the bundle's code dependencies are not resolved.
		 * The Framework may attempt to resolve an <code>INSTALLED</code> bundle's
		 * code dependencies and move the bundle to the <code>RESOLVED</code>
		 * state.
		 * <p>
		 * The value of <code>INSTALLED</code> is 0x00000002.
		 */
		public static var INSTALLED:int=0x00000002;

		/**
		 * This bundle is resolved and is able to be started.
		 *
		 * <p>
		 * A bundle is in the <code>RESOLVED</code> state when the Framework has
		 * successfully resolved the bundle's dependencies. These dependencies
		 * include:
		 * <ul>
		 * <li>The bundle's class path from its {@link Constants#BUNDLE_CLASSPATH}
		 * Manifest header.
		 * <li>The bundle's package dependencies from its
		 * {@link Constants#EXPORT_PACKAGE} and {@link Constants#IMPORT_PACKAGE}
		 * Manifest headers.
		 * <li>The bundle's required bundle dependencies from its
		 * {@link Constants#REQUIRE_BUNDLE} Manifest header.
		 * <li>A fragment bundle's host dependency from its
		 * {@link Constants#FRAGMENT_HOST} Manifest header.
		 * </ul>
		 * <p>
		 * Note that the bundle is not active yet. A bundle must be put in the
		 * <code>RESOLVED</code> state before it can be started. The Framework may
		 * attempt to resolve a bundle at any time.
		 * <p>
		 * The value of <code>RESOLVED</code> is 0x00000004.
		 */
		public static var RESOLVED:int=0x00000004;

		/**
		 * This bundle is in the process of starting.
		 *
		 * <p>
		 * A bundle is in the <code>STARTING</code> state when the {@link #start}
		 * method is active. A bundle must be in this state when the bundle's
		 * {@link BundleActivator#start} is called. If this method completes without
		 * exception, then the bundle has successfully started and must move to the
		 * <code>ACTIVE</code> state.
		 * <p>
		 * The value of <code>STARTING</code> is 0x00000008.
		 */
		public static var STARTING:int=0x00000008;

		/**
		 * This bundle is in the process of stopping.
		 *
		 * <p>
		 * A bundle is in the <code>STOPPING</code> state when the {@link #stop}
		 * method is active. A bundle must be in this state when the bundle's
		 * {@link BundleActivator#stop} method is called. When this method completes
		 * the bundle is stopped and must move to the <code>RESOLVED</code> state.
		 * <p>
		 * The value of <code>STOPPING</code> is 0x00000010.
		 */
		public static var STOPPING:int=0x00000010;

		/**
		 * This bundle is now running.
		 *
		 * <p>
		 * A bundle is in the <code>ACTIVE</code> state when it has been
		 * successfully started.
		 * <p>
		 * The value of <code>ACTIVE</code> is 0x00000020.
		 */
		public static var ACTIVE:int=0x00000020;

		public function BundleConstants()
		{
		}

	}
}